let Mock = require('mockjs')
//所有数据
const allshop = Mock.mock({
  'list|100': [
    {
      id: '@id',
      image: '@image(100x100, @color)',
      'swiperImage|5': ['@image(100x100, @color)'],
      title: '@ctitle(5,20)',
      keyword: '@ctitle(5,10)',
      'freightTemplate|1': [1, 2, 3, 4, 5],
      'classId|1': [1, 2, 0, -1],
      'dw|1': ['位', '辆', '个', '件', '只'],
      'price|1-10000': 1,
      'sales|1-10000': 1,
      'stock|1-10000': 1,
      'sort|1-10000': 1,
      'status|1': [1, 2, 0, -1],

      optionDate: '@datetime("yyyy-MM-dd A HH:mm:ss")',
      content: '@content',
      'integral|1-10000': 1, // 积分
      'specs|1-5': [
        {
          image: '@image(50x50, @color)',
          'price|1-10000': 1, // 售价
          'costPrice|1-10000': 1, // 成本
          'cost|1-10000': 1, // 原价
          'stock|1-10000': 1, // 库存
          'commodityNumber|1-10000': 1, // 商品编号
          'kg|1-10000': 1, // 重量
          'volume|1-10000': 1, // 体积
        },
      ],
    },
  ],
})
//商品管理
const shopAdmin = Mock.mock({
  'list|100': [
    {
      id: '@id',
      name: '@cname',
      img: '@image(100x100)',
      'price|100-300': 0,
      'paynum|100-300': 0,
      'have|100-300': 0,
      'sortnum|100-300': 0,
      'state|0-1': 0,
      timer: '@DATETIME("yyyy-MM-dd HH:mm:ss")',
    },
  ],
})
//砍价列表
const killLookList = Mock.mock({
  'list|50': [
    {
      id: '@id',
      img: '@image(100x100,@color)',
      name: '@cname',
      text: '@cword(10,20)',
      'price|10-500': 0,
      'num|1-10': 1,
      'neednum|1-10': 1,
      'startTime|1000000000000-9999999999999': 1000000000000,
      'endTime|1000000000000-9999999999999': 1000000000000,
      'state|1': ['进行中', '已结束'],
    },
  ],
})
const shopSay = Mock.mock({
  'list|30-80': [
    {
      id: '@id(5)',
      title: '@ctitle(4,20)',
      img: '@image(20x20,@color)',
      name: '@cname(4)',
      num: '5',
      content: '@ctitle(10,30)',
      callmain: '@ctitle(3,10)',
      data: '@DATETIME("yyyy-MM-dd HH:mm:ss")',
    },
  ],
})
const shopType = Mock.mock({
  'list|50': [
    {
      id: '@id',
      type: '产品类型',
      name: '@ctitle',
      img: '@image(100x100,@color)',
      'num|10-100': 0,
    },
  ],
})
const shopRule = Mock.mock({
  'list|80': [
    {
      id: '@id',
      name: '@cname',
      title: '@ctitle(2,4)',
      'have|10-400': 0,
    },
  ],
})

const tableAdmin = Mock.mock({
  'list|5': [
    {
      id: '@id',
      'num|0-19': 1,
      'nums|0-100': 1,
      'numss|0-100': 2,
    },
  ],
})
const shopKill = Mock.mock({
  'list|20-30': [
    {
      id: '@id(5)',
      configuration: '@time',
      secondsKillTime: '@time',
      commodityImages: '@image(50x50,@color)',
      activityTitle: '@ctitle(4)',
      eventProfile: '@word(15)',
      'originalPrice|1-50': 1,
      'secondsToBargain|1-20': 1,
      'limited|1-20': 1,
      'residue|1-20': 1,
      'state|0-1': 1,
      creationTime: '@time',
    },
  ],
})

const commodityList = Mock.mock({
  'list|100': [
    {
      'id|1-100': 1,
      img: '@image(100x100,@color)',
      title: '@ctitle(6)',
      obj: {
        title: '@ctitle(6)',
        'num|1-100': 1,
        'price|1-1000': 1,
      },
      'people|1-200': 1,
      'peoples|1-200': 2,
      'flag|1': [0, 1],
      'allPeople|1-200': 1,
      keyword: '@ctitle(5,10)',
    },
  ],
})
<<<<<<< HEAD
const liveStreaming = Mock.mock({
  "list|120": [
    {
      "id": "@id",
      img: "@image(200x150,@color)",
      "name": "@cname(3,4)",
      title: '@ctitle(10,12)',
      desc: "@cword(20,30)",
      "gh|1000-9999": 1001,
      "num|20-100": 21,
      "money|100000-999999": 100001,
      "people|1000-2000": 1001,
      'dw|1': ['进入直播', '数据详情'],
      datas: '@DATETIME("2021.MM.dd HH:mm:ss")',
      'flag|1': [true, false]


    }
  ]
})
const huo = Mock.mock({
  "list|10": [{
    "id": "@id",
    "title": '@ctitle(5,7)',
    "name": "@cname(3,5)",
    "image": "@image(30x30,@color)",
    "price|100-200": 101,
  }]
})
Mock.mock("/gethuo", () => {
  return huo.list
})
=======
const groupShop=Mock.mock({
  "list|50":[{
    'id|1-50':1,
    img:"@image(100x100,@color)",
    title:"@ctitle(4)",
    name:"@cname",
    children:{
      'num|1-100': 1,
      'price|1-1000': 1,
      title:"@ctitle(4)",
    },
    'groupPrice|1-100':10,
    "joinPeople|1-100":1,
    "numPeople|1-100":1,
    "limitPeople|1-100":1,
    'flag|1': ['未完成', '已完成'],
    'endTime|1000000000000-9999999999999': 1000000000000,
    keyword: '@ctitle(5,10)',
  }]
})
>>>>>>> cc2595f2b3d271eab31d8ddc81e4b30015bb2835
module.exports = {
  shopAdmin: shopAdmin.list,
  tableAdmin,
  shopSay,
  shopType: shopType.list,
  shopRule: shopRule.list,
  shopKill,
  allshop,
  commodityList: commodityList.list,
  killLookList,
<<<<<<< HEAD
  liveStreaming: liveStreaming.list
=======
  groupShop:groupShop.list
>>>>>>> cc2595f2b3d271eab31d8ddc81e4b30015bb2835
}
